package org.cs.reception.ctl;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.cs.core.ctl.BaseCtl;
import org.cs.publics.model.GoodsInfo;
import org.cs.reception.service.IResGoodsInFoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.alibaba.fastjson.JSONObject;
/**
 * 关于商品的控制器
 * @author Administrator
 *
 */
@Controller
public class RecGoodsCtl extends BaseCtl{
	
	@Autowired
	private IResGoodsInFoService goodsInFoService;
	
	
	/**
	 * 获取全部推荐商品信息
	 * @return 包含商品信息的json数据
	 */
	@ResponseBody
	@RequestMapping("/getReCom.cs")
	public String getReCom(){
		System.out.println("成功进入获取推荐商品的控制器中");
		List<GoodsInfo> goodsInfos=goodsInFoService.getReCom();
		return JSONObject.toJSONString(goodsInfos);
	}
	
}
